﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sync.IRC.MessageFilter.Filters
{
    class DefaultFormat : FilterBase, IDanmaku, IOsu
    {
        const string sendCommand = "?send";
        public override void onMsg(ref MessageBase msg)
        {
            msg.user.setPerfix("<");
            msg.user.setSuffix(">");
            /*
            //用户不用?send发送的都是属于直播间内聊天
            if ((msg.user.RawText!=string.Empty)&&(!msg.message.RawText.StartsWith(sendCommand)))
                msg.cancel = true;

            //判断是由用户发送还是内部消息发送
            if (msg.user.RawText != string.Empty)
            {
                Tools.StringElement message = msg.message;
                msg.message = new Tools.StringElement(message.Perfix, message.RawText.Substring(sendCommand.Length).Trim(), message.Suffix);
                msg.user.setPerfix("<");
                msg.user.setSuffix(">");
            }
            */
        }
    }
}
